/*
 *	Copyright © 2013 Changsha Shishuo Network Technology Co., Ltd. All rights reserved.
 *	长沙市师说网络科技有限公司 版权所有
 *	http://www.shishuo.com
 */

package com.hlingsoft.kkh.dao;

import com.hlingsoft.kkh.entity.Notification;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
/**
 * 用户服务
 *
 * @author Zhang jiale
 *
 */

@Repository
public interface NotificationDao {


	/**
	 * 分享
	 *
	 * @param notification
	 * @return Integer
	 */
	public int addNotification(Notification notification);


	/**
	 * 获取
	 * @param toId
	 * @param offset
	 * @param rows
	 * @return
	 */
	public List<Notification> getNotificationByToId(@Param("toId") long toId,@Param("offset")int offset,@Param("rows")int rows);

	/**
	 * 获取关于某个活动的消息
	 * @param eventsId
	 * @return
	 */
	public List<Notification> getNotificationByEventsId(@Param("eventsId") long eventsId);


	public List<Notification> getNotificationByEventsIdWithNone(@Param("eventsId") long eventsId);
	/**
	 * 查询
	 * @param notification
	 * @return
	 */
	public Notification getNotification(Notification notification);

	/**
	 * 更新
	 * @param notification
	 * @return
	 */
	public Integer updateNotification(Notification notification);



	public List<Notification> getNotificationByAppUserId(@Param("appUserId") long appUserId);

	public List<Notification> getNotificationByAppUserIdWithNone(@Param("appUserId") long appUserId);

}
